/*
 * Graph_test.cpp
 *
 *  Created on: 11 lis 2013
 *      Author: dawid.wysakowicz
 */

#include "Graph.hpp"
#include "gtest_wrapper.hpp"

TEST(Graph, fullExample)
{
	const size_t VERITCES_COUNT = 7;
	const size_t SOURCE = 0;
	const size_t TARGET = 6;

	std::vector<std::tuple<int, int, int>> edges;
	edges.push_back(std::make_tuple(0,1,9));
	edges.push_back(std::make_tuple(0,4,9));
	edges.push_back(std::make_tuple(1,2,7));
	edges.push_back(std::make_tuple(1,3,3));
	edges.push_back(std::make_tuple(2,3,4));
	edges.push_back(std::make_tuple(2,6,6));
	edges.push_back(std::make_tuple(3,5,2));
	edges.push_back(std::make_tuple(3,6,9));
	edges.push_back(std::make_tuple(4,3,3));
	edges.push_back(std::make_tuple(4,5,6));
	edges.push_back(std::make_tuple(5,6,8));

	algorithm::Graph g(VERITCES_COUNT, SOURCE, TARGET);
	g.load(edges);

	std::cout << g.calculate();
	ASSERT_EQ(18, g.getMaxFlow()) << "Fmax = " << g.getMaxFlow();


}
